package com.imooc.girl.util;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

public class MapGradesOptions {
    public static List<String> getGradesOptions(String stuClass){
        List<String> list = new ArrayList<>();
        Date date = new Date();
        int start = Integer.valueOf(new SimpleDateFormat("yyyy").format(date).substring(0,2)+stuClass.substring(0,2));
        int end = Calendar.getInstance().get(Calendar.YEAR);
        for(int i=start;i<end;i++){
            list.add(String.valueOf(i)+"-"+String.valueOf(i+1)+"-"+"1");
            list.add(String.valueOf(i)+"-"+String.valueOf(i+1)+"-"+"2");
        }
        if(8<Integer.valueOf(new SimpleDateFormat("MM").format(date))){
            list.add(String.valueOf(end)+"-"+String.valueOf(end+1)+"-"+"1");
        }
        return list;
    }
}
